﻿using DFGK_WMS.Model.Dto;
using DFGK_WMS.Model.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DFGK.IService
{
    public interface IRoleService
    {
        /// <summary>
        /// 添加角色
        /// </summary>
        /// <param name="m"></param>
        /// <param name="message"></param>
        /// <returns></returns>
        bool AddRole(Role m,out string message);

        /// <summary>
        /// 删除角色
        /// </summary>
        /// <param name="rid"></param>
        /// <returns></returns>
        bool DelRole(long rid);

        /// <summary>
        /// 根据主键查询信息
        /// </summary>
        /// <param name="rid"></param>
        /// <returns></returns>
        Role? GetRoleById(long rid);

        /// <summary>
        /// 修改角色
        /// </summary>
        /// <param name="m"></param>
        /// <param name="message"></param>
        /// <returns></returns>
        bool UpdRole(Role m,out string message);

        /// <summary>
        /// 获取所有角色
        /// </summary>
        /// <param name="rname">用户名</param>
        /// <param name="state">状态</param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalCount"></param>
        /// <param name="pageCount"></param>
        /// <returns></returns>
        List<Role> GetRoleList(string rname, int state, int pageIndex, int pageSize, out int totalCount);

        /// <summary>
        /// 分配权限中的列表显示
        /// </summary>
        /// <returns></returns>
        List<MenuDto> GetRoleMenuActionList();
    }
}
